home *** CD-ROM | disk | FTP | other *** search
- FREQUENLY ASKED QUESTIONS
- =========================
-
- ----------------------------------------------------------------------
- Q: How can I use Cygnus Ed as external editor?
- (External editor)
- A: Using CygnusEd as external editor is not easy: Inserting "ced %f"
- in the requester is not enough, because CED needs a stack of 8000
- bytes. CED also detaches itself from MUIbase, so MUIbase cannot
- wait for the quit of CED. A solution is writing a script like
- this:
- .key file
- .bra {
- .ket }
- ; calls CED for MUIbase
- ; ---------------------
-
- stack 8192
- CED {file} "-pubscreen=MUIbase_PubScreen" -keepio
- Note that I use
- MUIbase_PubScreen
- as screen for MUIbase. If you use Workbench, so use
- -pubscreen=Workbench
- for that purpose. Save this script as
- MUIBASE:CallCED
- and type in the external editor field
- MUIBASE:CallCED %f.
-
- (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 18.06.1996)
- ----------------------------------------------------------------------
- Q: Why you are using (CONCAT2 "" ...)?
- (String programming)
- A: In the beginning of programming MUIbase, I used
- (CONCAT2 "" strings ...)
- to concatenate strings. Steffen told me that I have to engage my
- brain and he asked me why I didn't use
- (+ strings ...)
- instead of above one. :-)
-
- (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 15.04.1997)
- ----------------------------------------------------------------------
- Q: How can I make a conditional expression like C?
- (C-like programming)
- A: To use e.g.
- s=(t)?("1"):("0");
- from C in MUIbase, you simply have to use
- (SETQ s (IF t "1" "0"))
- to get the same result.
-
- (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 15.04.1997)
- ----------------------------------------------------------------------
- Q: Is there a way to use CygnusEd without using a script?
- (External editor)
- A: A short solution for the CED problem is typing this one into the
- external editor requester:
- stack 8192<CTRL J>CED -keepio %f
- The <CTRL J> is the shortcut for Line Feed (do not type the
- characters as shown [:-)] ). This is only possible, if you turned
- off the item "Text gadget filter" in the "IControl preferences".
-
- (Allan Odgaard [duff@diku.dk], 15.08.1997)
- ----------------------------------------------------------------------
- Q: How to implement AmigaBase's LOADMEMO?
- (AmigaBase equals)
- A: To use the "LOADMEMO" function from AmigaBase in MUIbase, you
- simply have to use this self defined function:
- (DEFUN loadMEMO (filename:STR)
- (LET ((file:FILE (FOPEN filename "r")) memo:MEMO)
- (SETQ memo (FGETMEMO file))
- (FCLOSE file)
- memo
- )
- )
- You might wonder, what will happen, if "(FOPEN)" fails? Then the
- variable "file" will hold "NIL". "(FGETMEMO file)" is evaluated to
- "(FGETMEMO NIL)" and returns also "NIL" and finally the complete
- function returns "NIL".
-
- (Steffen Gutmann [gutmann@informatik.uni-freiburg.de], 28.08.1997)
- ----------------------------------------------------------------------
- Q: How to make colorized text in MUIbase text objects?
- (GUI related)
- A: To specify colors in objects like "button" or "text", you simply
- have to insert a escape sequence. The sequence has the format
- <ESC>n
- where "<ESC>" is the escape character and "n" is the number of the
- pen. "n" can be used in the range from 0 and 9. In my MUI
- environment, colors 0, 2, 4, 6 and 9 are the text pen; color 1, 3
- and 8 are the highlight pen; color 5 is the fill pen and finally
- color 7 is the background pen. As you can see you only have 4
- colors!
- You are right if you say that after pressing <ESC> the window
- closes. Therefore you can use the copy'n'paste feature of the
- string gadgets (if according MUI library exists) as well as the
- simple keyboard shortcut <CTRL [> to write the <ESC> character into
- the string gadget.
-
- Avoid using color sequences in Window buttons, because the window
- titlebar does not replace the escape sequences and you would see
- the sequence as is!
- Due to the limited number of colors (only 4) in future there will
- not be a direct support for colorized text in MUIbase. So you can
- use this sequences.
-
- (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 29.01.1998)
- ----------------------------------------------------------------------
- Q: How to make styled text in MUIbase text objects?
- (GUI related)
- A: To specify styles in objects like "button" or "text", you simply
- have to insert a escape sequence. The sequence has the format
- <ESC>x
- where "<ESC>" is the escape character and "x" is one of the
- following characters:
- n normal style
- b bold style
- i italic style
- u underlined style
-
- You are right if you say that after pressing <ESC> the window
- closes. Therefore you can use the copy'n'paste feature of the
- string gadgets (if according MUI library exists) as well as the
- simple keyboard shortcut <CTRL [> to write the <ESC> character into
- the string gadget.
-
- Avoid using style sequences in Window buttons, because the window
- titlebar does not replace the escape sequences and you would see
- the sequence as is!
-
- (Ralph Reuchlein [raresoft@rz.fh-augsburg.de], 29.01.1998)
- ----------------------------------------------------------------------
- Q: Is there a way to have more flexible choice attributes?
- (Choice attributes)
- A: Yes, use a string attribute, set its display object to read-only
- and attach a listview to it. Now the user can't directly enter a
- string by hand but select an item from the popup listview. The
- difference to a choice attribute is that you can still change the
- order of labels and the label strings itself, as in this case real
- strings rather than internal numbers are stored in the records.
- There are also two programming functions for getting and setting
- the labels: (GETLABELS <attr>) and (SETLABELS <attr> <string>).
-
- (Steffen Gutmann [gutmann@informatik.uni-freiburg.de], 02.03.1998)
- ----------------------------------------------------------------------
-